package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;

import bean.JTextFieldValidator;



public class JFFraseAvanzada extends javax.swing.JFrame {
	private JPanel pnlAvanzado;
	private JTextFieldValidator txt7;
	private JTextFieldValidator txt8;
	private JTextFieldValidator txt9;
	private JLabel lbl1;
	private JTextFieldValidator txt1;
	private JTextFieldValidator txt2;
	private JTextFieldValidator txt3;
	private JTextFieldValidator txt4;
	private JTextFieldValidator txt5;
	private JLabel lbl2;
	private JButton btnaceptar;
	private JLabel lblcodigo;
	private JTextFieldValidator txt10;
	private JTextFieldValidator txt6;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public JFFraseAvanzada() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setTitle("Frase Nivel Avanzado");
			{
				pnlAvanzado = new JPanel();
				getContentPane().add(pnlAvanzado, BorderLayout.CENTER);
				pnlAvanzado.setLayout(null);
				{
					btnaceptar = new JButton();
					pnlAvanzado.add(btnaceptar);
					btnaceptar.setText("Aceptar");
					btnaceptar.setFont(new java.awt.Font("Purisa",1,14));
					btnaceptar.setBounds(299, 259, 100, 30);
					
				}
				{
					lbl2 = new JLabel();
					pnlAvanzado.add(lbl2);
					lbl2.setText("Debe Introducir de Seis(6) a Diez(10) Palabras");
					lbl2.setFont(new java.awt.Font("Purisa",0,10));
					lbl2.setBounds(217, 189, 322, 15);
				}
				{
					txt5 = new JTextFieldValidator(JTextFieldValidator.SOLO_LETRAS);
					pnlAvanzado.add(txt5);
					txt5.setBounds(556, 83, 120, 30);
					txt5.setFont(new java.awt.Font("Purisa",1,14));
				}
				{
					txt4 = new JTextFieldValidator(JTextFieldValidator.SOLO_LETRAS);
					pnlAvanzado.add(txt4);
					txt4.setBounds(419, 83, 120, 30);
					txt4.setFont(new java.awt.Font("Purisa",1,14));
				}
				{
					txt3 = new JTextFieldValidator(JTextFieldValidator.SOLO_LETRAS);
					pnlAvanzado.add(txt3);
					txt3.setBounds(287, 83, 120, 30);
					txt3.setFont(new java.awt.Font("Purisa",1,14));
				}
				{
					txt2 = new JTextFieldValidator(JTextFieldValidator.SOLO_LETRAS);
					pnlAvanzado.add(txt2);
					txt2.setBounds(151, 83, 120, 30);
					txt2.setFont(new java.awt.Font("Purisa",1,14));
				}
				{
					txt1 = new JTextFieldValidator(JTextFieldValidator.SOLO_LETRAS);
					pnlAvanzado.add(txt1);
					txt1.setBounds(19, 83, 120, 30);
					txt1.setFont(new java.awt.Font("Purisa",1,14));
				}
				{
					lbl1 = new JLabel();
					pnlAvanzado.add(lbl1);
					lbl1.setText("Indroduzca la Frase:");
					lbl1.setFont(new java.awt.Font("Purisa",1,16));
					lbl1.setBounds(33, 31, 229, 27);
				}
				{
					txt9 = new JTextFieldValidator(JTextFieldValidator.SOLO_LETRAS);
					pnlAvanzado.add(txt9);
					txt9.setBounds(419, 132, 120, 30);
					txt9.setFont(new java.awt.Font("Purisa",1,14));
				}
				{
					txt8 = new JTextFieldValidator(JTextFieldValidator.SOLO_LETRAS);
					pnlAvanzado.add(txt8);
					txt8.setBounds(287, 132, 120, 30);
					txt8.setFont(new java.awt.Font("Purisa",1,14));
				}
				{
					txt7 = new JTextFieldValidator(JTextFieldValidator.SOLO_LETRAS);
					pnlAvanzado.add(txt7);
					txt7.setBounds(151, 132, 120, 30);
					txt7.setFont(new java.awt.Font("Purisa",1,14));
				}
				{
					txt6 = new JTextFieldValidator(JTextFieldValidator.SOLO_LETRAS);
					pnlAvanzado.add(txt6);
					txt6.setBounds(19, 132, 120, 30);
					txt6.setFont(new java.awt.Font("Purisa",1,14));
				}
				{
					txt10 = new JTextFieldValidator(JTextFieldValidator.SOLO_LETRAS);
					pnlAvanzado.add(txt10);
					txt10.setBounds(556, 132, 120, 30);
					txt10.setFont(new java.awt.Font("Purisa",1,14));
				}
				{
					lblcodigo = new JLabel();
					pnlAvanzado.add(lblcodigo);
					lblcodigo.setText("3");
					lblcodigo.setBounds(624, 16, 10, 15);
					lblcodigo.setVisible(false);
				}
			}
			pack();
			this.setSize(719, 355);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

	public JPanel getPnlAvanzado() {
		return pnlAvanzado;
	}

	public void setPnlAvanzado(JPanel pnlAvanzado) {
		this.pnlAvanzado = pnlAvanzado;
	}

	public JTextFieldValidator getTxt7() {
		return txt7;
	}

	public void setTxt7(JTextFieldValidator txt7) {
		this.txt7 = txt7;
	}

	public JTextFieldValidator getTxt8() {
		return txt8;
	}

	public void setTxt8(JTextFieldValidator txt8) {
		this.txt8 = txt8;
	}

	public JTextFieldValidator getTxt9() {
		return txt9;
	}

	public void setTxt9(JTextFieldValidator txt9) {
		this.txt9 = txt9;
	}

	public JLabel getLbl1() {
		return lbl1;
	}

	public void setLbl1(JLabel lbl1) {
		this.lbl1 = lbl1;
	}

	public JTextFieldValidator getTxt1() {
		return txt1;
	}

	public void setTxt1(JTextFieldValidator txt1) {
		this.txt1 = txt1;
	}

	public JTextFieldValidator getTxt2() {
		return txt2;
	}

	public void setTxt2(JTextFieldValidator txt2) {
		this.txt2 = txt2;
	}

	public JTextFieldValidator getTxt3() {
		return txt3;
	}

	public void setTxt3(JTextFieldValidator txt3) {
		this.txt3 = txt3;
	}

	public JTextFieldValidator getTxt4() {
		return txt4;
	}

	public void setTxt4(JTextFieldValidator txt4) {
		this.txt4 = txt4;
	}

	public JTextFieldValidator getTxt5() {
		return txt5;
	}

	public void setTxt5(JTextFieldValidator txt5) {
		this.txt5 = txt5;
	}

	public JLabel getLbl2() {
		return lbl2;
	}

	public void setLbl2(JLabel lbl2) {
		this.lbl2 = lbl2;
	}

	public JButton getBtnaceptar() {
		return btnaceptar;
	}

	public void setBtnaceptar(JButton btnaceptar) {
		this.btnaceptar = btnaceptar;
	}

	public JLabel getLblcodigo() {
		return lblcodigo;
	}

	public void setLblcodigo(JLabel lblcodigo) {
		this.lblcodigo = lblcodigo;
	}

	public JTextFieldValidator getTxt10() {
		return txt10;
	}

	public void setTxt10(JTextFieldValidator txt10) {
		this.txt10 = txt10;
	}

	public JTextFieldValidator getTxt6() {
		return txt6;
	}

	public void setTxt6(JTextFieldValidator txt6) {
		this.txt6 = txt6;
	}
	public void mostrarMensaje(String mensaje)
	{
		JOptionPane.showMessageDialog(this, mensaje);
	}
	public void Limpiar()
	{
		txt1.setText(" ");
		txt2.setText(" ");
		txt3.setText(" ");
		txt4.setText(" ");
		txt5.setText(" ");
		txt6.setText(" ");
		txt7.setText(" ");
		txt8.setText(" ");
		txt9.setText(" ");
		txt10.setText(" ");
		
	}
	public void addListener (ActionListener actionListener)
	{
		this.btnaceptar.addActionListener(actionListener);
	}

}
